﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.pp.processor.type.comm;

namespace SharpSqlAnalyzer.pp.stmtformatter.type.comm
{
	// Token: 0x020001FF RID: 511
	public class CommonStmtFormatter : AbstractStmtFormatter
	{
		// Token: 0x060011F7 RID: 4599 RVA: 0x00317656 File Offset: 0x00315856
		public virtual void addStmtProcessor(AbstractProcessor p)
		{
			if (this.stmtProcessors == null)
			{
				this.stmtProcessors = new List<AbstractProcessor>();
			}
			this.stmtProcessors.Add(p);
		}

		// Token: 0x060011F8 RID: 4600 RVA: 0x00317677 File Offset: 0x00315877
		protected internal virtual CommonStmtFormatter newInstanceFormatter()
		{
			return new CommonStmtFormatter();
		}

		// Token: 0x060011F9 RID: 4601 RVA: 0x0031767E File Offset: 0x0031587E
		protected internal override void doFormat(TCustomSqlStatement stmt)
		{
			this.runProcessor<TCustomSqlStatement>(this.SpecialProcessors, stmt);
			if (stmt.Statements != null && stmt.Statements.size() > 0)
			{
				this.runProcessor<TStatementList>(this.stmtProcessors, stmt.Statements);
			}
		}

		// Token: 0x040013D2 RID: 5074
		private IList<AbstractProcessor> stmtProcessors;
	}
}
